import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;

//字符流
public class Demo5 {
    public static void main(String[] args) throws IOException {
        Reader reader = new FileReader("./text2.txt");
        char[] ch = new char[1024];
        int len = reader.read(ch);
        for (int i = 0; i < len; i++) {
            System.out.println(ch[i]);
        }

        reader.close();
    }
}
